<!--{template ADMIN_DIRECTORY/tpl/admin_header}--> 
 
	<div class="page_title">	
    	<h1>{$model_info['model_name']}{$_lang['manage']}</h1>
         <div class="tool">
         	<a href="index.php?do=model&model_id=8&view=list&status=0" class="here">{$_lang['task_list']}</a>
		<!--	<a href="index.php?do=model&model_id=8&view=config">{$_lang['task_config']}</a>-->
		 </div>
	</div>
    <!--页头结束-->

    <!--提示结束-->
     
        <div class="box search p_relative">
    	<div class="title"><h2>{$_lang['search']}</h2></div>
        <div class="detail" id="detail">
           
		    <form action="index.php?do=model&model_id=8&view=list" method="post">
				 <input type="hidden" value="{$page}" name="page">
				<table cellspacing="0" cellpadding="0">
					<tbody>
                        <tr>
                            <th>{$_lang['task_id']}</th>
                            <td><input type="text" value="$w[task_id]" name="w[task_id]" class="txt"/></td>
                            <th>{$_lang['platform']}</th>
                            <td>
								<select class="ps vm" name="w[wb_platform]" >
                            	{loop $wb_platform_arr $k $v}
									<option value="{$k}" {if $w[wb_platform]==$k} selected="selected" {/if}>{$v}</option>
								{/loop}	
								</select>
							</td>
                             <th></th><td></td>
						</tr>
                        <tr>
                            <th>{$_lang['choose_task_status']}</th>
                            <td>
                            	<select class="ps vm" name="w[task_status]" id="catid" onchange="statusJump(this.value)">
                            	<option value="">{$_lang['please_choose']}</option>
                            	{loop $task_status $k $v}
								<!--{eval $k = strval($k);}-->
									<option value="$k" {if $w[task_status]===$k} selected="selected" {/if}>$v</option>
								{/loop}	
								</select>
								</td>
							<th>{$_lang['result_order']}</th>
							<td>
								
								<select name="ord[]">
                                <option value="task_id" {if $ord[0]=='task_id' or !isset($ord[0])} selected="selected"{/if}>{$_lang['default_order']}</option>
                                
                                </select>
                                <select name="ord[]" onchange="orderJump(this.value)">
                                <option {if $ord[1]=='desc' or !isset($ord[1])}selected="selected" {/if} value="desc">{$_lang['desc']}</option>
                                <option {if $ord[1]=='asc'}selected="selected" {/if} value="asc">{$_lang['asc']}</option>
                                </select>
							</td>
                            <th>{$_lang['list_result']}</th>
                            <td><select name="w[page_size]" onchange="pageJump(this.value)">
									<option value="10" {if $page_size=='10'}selected="selected"{/if}>{$_lang['page_size']}10</option>
									<option value="20" {if $page_size=='20'}selected="selected"{/if}>{$_lang['page_size']}20</option>
									<option value="30" {if $page_size=='30'}selected="selected"{/if}>{$_lang['page_size']}30</option>
								</select>
                              	<button class="pill" type="submit" value="{$_lang['search']}" name="sbt_search">
                            		<span class="magnifier icon">&nbsp;</span>{$_lang['search']}
								</button></td>
                        </tr>
                    </tbody>
                </table>
            </form>
			
        </div>
    </div>
    <!--搜索结束-->
    
    <div class="box list">
    	<div class="title"><h2>{$_lang['wbzf_task_list']}</h2></div>
        <div class="detail">
        	<form action="" id='frm_list' method="post">
        	<input type="hidden" value="{$page}" name="page">
			<input type="hidden" name="w[page_size]" value="{$page_size}">
               <div id="ajax_dom"><input type="hidden" value="{$page}" name="page">
               <table cellpadding="0" cellspacing="0">
                <tbody>
                  <tr>
                    <th><input type="checkbox" id="checkbox" onclick="checkall();" class="checkbox" >编号</th>
                    <th width="15%">{$_lang['task_title']}</th>
                    <th width="10%">{$_lang['task_status']}</th>
                    <th width="10%">{$_lang['task_cash']}</th>
                    <th width="10%">{$_lang['haved_pay']}</th>
                    <th width="8%">{$_lang['pub_name']}</th>
					<th width="8%">{$_lang['wb_platform']}</th>
					<th width="10%">{$_lang['total_fans']}</th>
                    <th width="25%">{$_lang['operate']}</th>
                  </tr>
                  {loop $task_arr $k $v}
                  <tr class="item">
                 	<td width="10%"><input type="checkbox" name="ckb[]" class="checkbox" value="{$v[task_id]}" class="checkbox">{$v[task_id]}</td>
                    <td class="td28">
                    	<a href="../../index.php?do=task&id={$v[task_id]}" target="_blank"><!--{eval echo kekezu::cutstr($v[task_title],40)}--></a>
						
					</td>
                    <td>{$task_status[$v[task_status]]}</td>
                    <td>{c:$v[task_cash]}</td>
				     <td>{if $v[pay_amount]}{c:$v[pay_amount]}{else}0{/if}</td>
				     <td>{$v[username]}</td>
					<td>{if $v[wb_platform]=='sina'}{$_lang['sina']}{elseif $v[wb_platform]=='ten'}{$_lang['ten']}{elseif $v[wb_platform]=='sina,ten'}{$_lang['ten_sina']}{/if}</td>
					<td>$v[fans_count]</td>
                    <td>
                    	{if $v[task_status]==1||$v[task_status]==0}
                    	<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=pass&page={$page}" class="button"><span class="check icon"></span>{$_lang['pass']}</a>
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=nopass&page={$page}" class="button"><span class="cross icon"></span>{$_lang['nopass']}</a>
						{/if}
						
						{if in_array($v[task_status],array('2','3')) && $v[is_top]!=1}
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&task_id=$v[task_id]&ac=recommend&page={$page}" class="button"><span class="uparrow icon"></span>{$_lang['recommend']}</a>
						{/if}
						
						{if $v[is_top]==1}
							<a href="index.php?do=model&model_id=$model_id&view=list&ac=unrecommend&task_id={$v[task_id]}&page={$page}" class="button"><span class="downarrow icon"></span>{$_lang['cancel_recommend']}</a>
						{/if}
						<a href="index.php?do=model&model_id=$v[model_id]&view=edit&task_id=$v[task_id]&page={$page}" class="button dbl_target"><span class="pen icon"></span>{$_lang['edit']}</a>
						{if in_array($v[task_status],array('0','8','9','10'))}
						<a href="index.php?do=model&model_id=$v[model_id]&view=list&ac=del&task_id=$v[task_id]&page={$page}" class="button"  onclick="return cdel(this);"><span class="trash icon"></span>{$_lang['delete']}</a>
						{/if}
					</td>
                  </tr>
                  {/loop}
                  
                  <tr>
                    <td colspan="9">
	                    {if $pages[page]}<div class="page fl_right">{$pages[page]}</div>{/if}
	                    
	                    <div class="clearfix">
	                  		<label for="checkbox" onclick="checkall(event);">{$_lang['select_all']}</label>
	                        <input type="hidden" name="sbt_action" class="sbt_action"/>
							
							{if $w[task_status]=='0'||$w[task_status]=='1'||$w[task_status]=='8'||$w[task_status]=='9'||$w[task_status]=='10'}
	                        <button type="submit" value="{$_lang['mulit_delete']}" onclick="return batch_act(this,'frm_list');" class="pill negative" ><span class="icon trash"></span>{$_lang['mulit_delete']}</button>
							{/if}
							
							{if $w[task_status]=='1'||$w[task_status]=='0'}
	                        <button type="submit" value="{$_lang['mulit_pass']}" onclick="return batch_act(this,'frm_list');"  class="positive pill negative"><span class="icon check">&nbsp;</span>{$_lang['mulit_pass']}</button>
							<button type="submit" value="{$_lang['mulit_nopass']}" onclick="return batch_act(this,'frm_list');"  class="positive pill negative"><span class="icon check">&nbsp;</span>{$_lang['mulit_nopass']}</button>
							{/if}
							
							
	                    </div>
                    </td>
                  </tr>
                </tbody>
              </table></div>
        	</form>
        </div>       
    </div>
	<!--主体结束-->
<script type="text/javascript">
	var url = '{$url_str}';
	function statusJump(task_status){
		window.location.href = url+'&w[task_status]='+task_status;
	}
	function orderJump(value){
		var ord1 = $("#ord1").children("option:selected").val();//selected的值
		window.location.href= url+'&ord[0]='+ord1+'&ord[1]='+value;
	}
	function pageJump(value){
		window.location.href = url+'&page_size='+value;
	}
</script>
<!--{template ADMIN_DIRECTORY/tpl/admin_footer}-->
